Integrand size = 26, antiderivative size = 150 \[ \int \sec (c+d x) (a \cos (c+d x)+b \sin (c+d x))^4 \, dx=\frac {b^4 \text {arctanh}(\sin (c+d x))}{d}-\frac {4 a b^3 \cos (c+d x)}{d}-\frac {4 a^3 b \cos ^3(c+d x)}{3 d}+\frac {4 a b^3 \cos ^3(c+d x)}{3 d}+\frac {a^4 \sin (c+d x)}{d}-\frac {b^4 \sin (c+d x)}{d}-\frac {a^4 \sin ^3(c+d x)}{3 d}+\frac {2 a^2 b^2 \sin ^3(c+d x)}{d}-\frac {b^4 \sin ^3(c+d x)}{3 d} \]
[Out]
Time = 0.18 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3169, 2713, 2645, 30, 2644, 2672, 308, 212} \[ \int \sec (c+d x) (a \cos (c+d x)+b \sin (c+d x))^4 \, dx=-\frac {a^4 \sin ^3(c+d x)}{3 d}+\frac {a^4 \sin (c+d x)}{d}-\frac {4 a^3 b \cos ^3(c+d x)}{3 d}+\frac {2 a^2 b^2 \sin ^3(c+d x)}{d}+\frac {4 a b^3 \cos ^3(c+d x)}{3 d}-\frac {4 a b^3 \cos (c+d x)}{d}+\frac {b^4 \text {arctanh}(\sin (c+d x))}{d}-\frac {b^4 \sin ^3(c+d x)}{3 d}-\frac {b^4 \sin (c+d x)}{d} \]
[In]
[Out]
Rule 30
Rule 212
Rule 308
Rule 2644
Rule 2645
Rule 2672
Rule 2713
Rule 3169
Rubi steps \begin{align*} \text {integral}& = \int \left (a^4 \cos ^3(c+d x)+4 a^3 b \cos ^2(c+d x) \sin (c+d x)+6 a^2 b^2 \cos (c+d x) \sin ^2(c+d x)+4 a b^3 \sin ^3(c+d x)+b^4 \sin ^3(c+d x) \tan (c+d x)\right ) \, dx \\ & = a^4 \int \cos ^3(c+d x) \, dx+\left (4 a^3 b\right ) \int \cos ^2(c+d x) \sin (c+d x) \, dx+\left (6 a^2 b^2\right ) \int \cos (c+d x) \sin ^2(c+d x) \, dx+\left (4 a b^3\right ) \int \sin ^3(c+d x) \, dx+b^4 \int \sin ^3(c+d x) \tan (c+d x) \, dx \\ & = -\frac {a^4 \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}-\frac {\left (4 a^3 b\right ) \text {Subst}\left (\int x^2 \, dx,x,\cos (c+d x)\right )}{d}+\frac {\left (6 a^2 b^2\right ) \text {Subst}\left (\int x^2 \, dx,x,\sin (c+d x)\right )}{d}-\frac {\left (4 a b^3\right ) \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{d}+\frac {b^4 \text {Subst}\left (\int \frac {x^4}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d} \\ & = -\frac {4 a b^3 \cos (c+d x)}{d}-\frac {4 a^3 b \cos ^3(c+d x)}{3 d}+\frac {4 a b^3 \cos ^3(c+d x)}{3 d}+\frac {a^4 \sin (c+d x)}{d}-\frac {a^4 \sin ^3(c+d x)}{3 d}+\frac {2 a^2 b^2 \sin ^3(c+d x)}{d}+\frac {b^4 \text {Subst}\left (\int \left (-1-x^2+\frac {1}{1-x^2}\right ) \, dx,x,\sin (c+d x)\right )}{d} \\ & = -\frac {4 a b^3 \cos (c+d x)}{d}-\frac {4 a^3 b \cos ^3(c+d x)}{3 d}+\frac {4 a b^3 \cos ^3(c+d x)}{3 d}+\frac {a^4 \sin (c+d x)}{d}-\frac {b^4 \sin (c+d x)}{d}-\frac {a^4 \sin ^3(c+d x)}{3 d}+\frac {2 a^2 b^2 \sin ^3(c+d x)}{d}-\frac {b^4 \sin ^3(c+d x)}{3 d}+\frac {b^4 \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d} \\ & = \frac {b^4 \text {arctanh}(\sin (c+d x))}{d}-\frac {4 a b^3 \cos (c+d x)}{d}-\frac {4 a^3 b \cos ^3(c+d x)}{3 d}+\frac {4 a b^3 \cos ^3(c+d x)}{3 d}+\frac {a^4 \sin (c+d x)}{d}-\frac {b^4 \sin (c+d x)}{d}-\frac {a^4 \sin ^3(c+d x)}{3 d}+\frac {2 a^2 b^2 \sin ^3(c+d x)}{d}-\frac {b^4 \sin ^3(c+d x)}{3 d} \\ \end{align*}
Time = 2.42 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.21 \[ \int \sec (c+d x) (a \cos (c+d x)+b \sin (c+d x))^4 \, dx=\frac {-12 a b \left (a^2+3 b^2\right ) \cos (c+d x)+\left (-4 a^3 b+4 a b^3\right ) \cos (3 (c+d x))-12 b^4 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 b^4 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+9 a^4 \sin (c+d x)+18 a^2 b^2 \sin (c+d x)-15 b^4 \sin (c+d x)+a^4 \sin (3 (c+d x))-6 a^2 b^2 \sin (3 (c+d x))+b^4 \sin (3 (c+d x))}{12 d} \]
[In]
[Out]
Time = 1.31 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.77
method | result | size |
derivativedivides | \(\frac {\frac {a^{4} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}-\frac {4 a^{3} b \cos \left (d x +c \right )^{3}}{3}+2 a^{2} b^{2} \sin \left (d x +c \right )^{3}-\frac {4 a \,b^{3} \left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3}+b^{4} \left (-\frac {\sin \left (d x +c \right )^{3}}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )}{d}\) | \(116\) |
default | \(\frac {\frac {a^{4} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}-\frac {4 a^{3} b \cos \left (d x +c \right )^{3}}{3}+2 a^{2} b^{2} \sin \left (d x +c \right )^{3}-\frac {4 a \,b^{3} \left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3}+b^{4} \left (-\frac {\sin \left (d x +c \right )^{3}}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )}{d}\) | \(116\) |
parts | \(\frac {a^{4} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3 d}+\frac {b^{4} \left (-\frac {\sin \left (d x +c \right )^{3}}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )}{d}-\frac {4 a^{3} b}{3 \sec \left (d x +c \right )^{3} d}+\frac {4 a \,b^{3} \left (\frac {\cos \left (d x +c \right )^{3}}{3}-\cos \left (d x +c \right )\right )}{d}+\frac {2 a^{2} b^{2} \sin \left (d x +c \right )^{3}}{d}\) | \(130\) |
parallelrisch | \(\frac {-12 b^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+12 b^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (a^{4}-6 a^{2} b^{2}+b^{4}\right ) \sin \left (3 d x +3 c \right )+\left (-4 a^{3} b +4 a \,b^{3}\right ) \cos \left (3 d x +3 c \right )+\left (9 a^{4}+18 a^{2} b^{2}-15 b^{4}\right ) \sin \left (d x +c \right )-12 b \left (\left (a^{2}+3 b^{2}\right ) \cos \left (d x +c \right )+\frac {4 a^{2}}{3}+\frac {8 b^{2}}{3}\right ) a}{12 d}\) | \(146\) |
norman | \(\frac {-\frac {8 a^{3} b +16 a \,b^{3}}{3 d}+\frac {2 \left (a^{4}-b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 \left (a^{4}-b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {8 a^{3} b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d}+\frac {2 \left (5 a^{4}+24 a^{2} b^{2}-13 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}+\frac {2 \left (5 a^{4}+24 a^{2} b^{2}-13 b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 d}-\frac {4 \left (2 a^{3} b +16 a \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{3 d}-\frac {2 \left (4 a^{3} b +8 a \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4}}+\frac {b^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {b^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(272\) |
risch | \(-\frac {{\mathrm e}^{i \left (d x +c \right )} a^{3} b}{2 d}-\frac {3 \,{\mathrm e}^{i \left (d x +c \right )} a \,b^{3}}{2 d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} a^{4}}{8 d}-\frac {5 i {\mathrm e}^{-i \left (d x +c \right )} b^{4}}{8 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} a^{4}}{8 d}-\frac {{\mathrm e}^{-i \left (d x +c \right )} a^{3} b}{2 d}-\frac {3 \,{\mathrm e}^{-i \left (d x +c \right )} a \,b^{3}}{2 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} a^{2} b^{2}}{4 d}+\frac {5 i {\mathrm e}^{i \left (d x +c \right )} b^{4}}{8 d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} a^{2} b^{2}}{4 d}+\frac {b^{4} \ln \left (i+{\mathrm e}^{i \left (d x +c \right )}\right )}{d}-\frac {b^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}-\frac {a^{3} b \cos \left (3 d x +3 c \right )}{3 d}+\frac {a \,b^{3} \cos \left (3 d x +3 c \right )}{3 d}+\frac {\sin \left (3 d x +3 c \right ) a^{4}}{12 d}-\frac {\sin \left (3 d x +3 c \right ) a^{2} b^{2}}{2 d}+\frac {\sin \left (3 d x +3 c \right ) b^{4}}{12 d}\) | \(319\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 121, normalized size of antiderivative = 0.81 \[ \int \sec (c+d x) (a \cos (c+d x)+b \sin (c+d x))^4 \, dx=-\frac {24 \, a b^{3} \cos \left (d x + c\right ) - 3 \, b^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, b^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 8 \, {\left (a^{3} b - a b^{3}\right )} \cos \left (d x + c\right )^{3} - 2 \, {\left (2 \, a^{4} + 6 \, a^{2} b^{2} - 4 \, b^{4} + {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{6 \, d} \]
[In]
[Out]
\[ \int \sec (c+d x) (a \cos (c+d x)+b \sin (c+d x))^4 \, dx=\int \left (a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}\right )^{4} \sec {\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.23 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.84 \[ \int \sec (c+d x) (a \cos (c+d x)+b \sin (c+d x))^4 \, dx=-\frac {8 \, a^{3} b \cos \left (d x + c\right )^{3} - 12 \, a^{2} b^{2} \sin \left (d x + c\right )^{3} + 2 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{4} - 8 \, {\left (\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )} a b^{3} + {\left (2 \, \sin \left (d x + c\right )^{3} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right ) + 6 \, \sin \left (d x + c\right )\right )} b^{4}}{6 \, d} \]
[In]
[Out]
none
Time = 0.38 (sec) , antiderivative size = 217, normalized size of antiderivative = 1.45 \[ \int \sec (c+d x) (a \cos (c+d x)+b \sin (c+d x))^4 \, dx=\frac {3 \, b^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, b^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (3 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 12 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 2 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 24 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 10 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 4 \, a^{3} b - 8 \, a b^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{3 \, d} \]
[In]
[Out]
Time = 26.10 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.27 \[ \int \sec (c+d x) (a \cos (c+d x)+b \sin (c+d x))^4 \, dx=\frac {2\,b^4\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {\frac {16\,a\,b^3}{3}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (2\,a^4-2\,b^4\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {4\,a^4}{3}+16\,a^2\,b^2-\frac {20\,b^4}{3}\right )+\frac {8\,a^3\,b}{3}-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a^4-2\,b^4\right )+16\,a\,b^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+8\,a^3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
[In]
[Out]